package pl.edu.mimuw.irs.rcp.view.figure;

import org.eclipse.draw2d.Graphics;



public class SimulationEventPlaceShape extends SimulationPlaceShape {
	
	// *** Attributes

	private boolean busy;
	public boolean isBusy() {
		return busy;
	}
	public void setBusy(boolean busy) {
		this.busy = busy;
	}
	
	// *** Constructors
	
	// *** Methods
	
	@Override
	protected void fillShape(Graphics graphics) {
		super.fillShape(graphics);
		if (!isBusy()) return;
		
		/*Rectangle rectangle = getBounds();
		Display display = Display.getCurrent();
		try {
			if (display == null) System.out.println("display is null");
			InputStream stream = this.getClass().getResourceAsStream("gears.svg");
			if (stream == null) System.out.println("stream is null");
			Image image = new Image(display, stream);
			graphics.drawImage(image, rectangle.getTopLeft());
		} catch (Exception ex) {
			System.out.println(ex);
		}XXX : gears */
	}
	
	@Override
	protected DoubleGradient getDoubleGradient() {
		if (isBusy()) return DoubleGradient.LIGHT_BLUE;
		else return DoubleGradient.RED_ORANGE;
	}
}
